> ## Documentation Index
> Fetch the complete documentation index at: https://sequence-0fb8d9e6-api_docs.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Sign Messages

Signing a message is an [asynchronous Task](https://medium.com/@sonusprocks/async-await-in-c-unity-explained-in-easy-words-571ebb6a9369). You can use `await` when calling `WaaSWallet.SignMessage` from within an async Task if you wish to obtain the `SignMessageReturn` object directly. Or, you can take the recommended approach which is to setup a handler function for the `WaaSWallet.OnSignMessageComplete` event and call the `WaaSWallet.SignMessage` method from anywhere (without await). For example:

```csharp theme={null}
public void OnSignMessageCompleteHandler(string signature) {
    // Do something
}

public void OnWalletCreatedHander(SequenceWallet wallet) {
    wallet.OnSignMessageComplete += OnSignMessageCompleteHandler;
}
```

```csharp theme={null}
_wallet.SignMessage(Chain.Polygon, "Message to sign");
```

If you're unfamiliar with working with events in Unity, check out this great [Reddit post](https://www.reddit.com/r/gamedev/comments/u3hz2v/how_to_use_events_a_supersimple_unity_example/)!
